global !p
#! /usr/bin/env python

import hashlib

def make_change_id():
    fd = open("/dev/urandom", "rb")
    buf = fd.read(80)
    hash = hashlib.sha1()
    hash.update(buf)
    change_id = hash.hexdigest()
    return "Change-Id: I" + change_id
endglobal

snippet changeid "Gen Change-Id"
`!p if not snip.c: snip.rv = make_change_id()`
endsnippet

snippet dmani "deploy manifest" !b
[manifest][skip-ci] update download.production
endsnippet
